//app.js
App({
  onLaunch: function () {
    var that = this;
    wx.login({
      success: function (res) {
        that.globalData.code = res.code;
        console.log(res)
      }
    })
  },
  globalData: {
    userInfo: null,
    code:""
  }
})